const baseUrl = 'https://tea.qingnian8.com/api/bizhi'
export const request = (config = {}) => {
	let {
		url,
		data = {},
		method = 'GET',
		header = {}
	} = config
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseUrl + url,
			data,
			method,
			header,
			success(res) {
				if (res.data.errCode == 0) {
					resolve(res.data)
				}
			},
			fail(err) {
				reject(err)
			}
		})
	})
}